package com.hzhjhh.view.manageView.menus;

import java.awt.Color;

import javax.swing.JMenu;
import javax.swing.JMenuItem;

import com.hzhjhh.view.manageView.menus.storage.AddGoodsDialog;
import com.hzhjhh.view.manageView.menus.storage.InOutTableDialog;
import com.hzhjhh.view.manageView.menus.storage.InReturnGoodsDialog;

/**
 * 菜单栏初始化-仓库
 * 
 * @author 12083
 *
 */
public class MStorage {

	public static JMenu init() {
		JMenu storage = new JMenu();
		storage.setBackground(Color.pink);
		storage.setText("仓库");
		
		// 入库/出库
		JMenuItem inOutStorage = new JMenuItem();
		inOutStorage.setText("入库/出库");
		inOutStorage.addActionListener(actListener -> {
			InOutTableDialog inOutTable = new InOutTableDialog();
		});
		storage.add(inOutStorage);
		
		// 进/退货
		JMenuItem inReturnGoods = new JMenuItem();
		inReturnGoods.setText("进/退货");
		inReturnGoods.addActionListener(event -> {
			InReturnGoodsDialog inReturnGoodsDialog = new InReturnGoodsDialog();
		});
		storage.add(inReturnGoods);
		
		// 新增商品
		JMenuItem addMerchandise = new JMenuItem();
		addMerchandise.setText("新增商品");
		addMerchandise.addActionListener(event -> {
			AddGoodsDialog addGoodsDialog = new AddGoodsDialog();
		});
		storage.add(addMerchandise);
		
		return storage;
	}
}
